home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act5 / 00471.ls < prev    next >
Encoding:
Text File  |  1995-03-28  |  681 b   |  27 lines

  1. on talkinghead sndname
  2.   if the number of cast sndname < 1 then
  3.     exit
  4.   end if
  5.   if the castType of cast sndname = #sound then
  6.     set ring to the number of cast "head1" - 1
  7.     puppetSound(sndname)
  8.     set ptime to the timer
  9.     set dtime to 0
  10.     set futtime to 20 + ptime + (the size of cast sndname / 183)
  11.     repeat while the timer < futtime
  12.       if the timer > dtime then
  13.         set the castNum of sprite 19 to ring + random(4)
  14.         set dtime to the timer + 10
  15.         if the mouseDown then
  16.           exit repeat
  17.         end if
  18.       end if
  19.       updateStage()
  20.       if the mouseDown then
  21.         exit repeat
  22.       end if
  23.     end repeat
  24.   end if
  25.   puppetSound(0)
  26. end
  27.